#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
int main(int argc,char* env[])
{
  extern char** environ;
  char* argv[] = {"ls","-a","-l",NULL};//一定要以空指针结尾
  pid_t pid = fork();
  if(pid == 0)
  {
   printf("I am a child process\n");
   execvpe("ls",argv,environ);//进程替换，执行ls命令
   exit(1);
  }
  printf("I am a father process\n");
  printf("hello linux\n");
  return 0;
}
